package pers.xx.sbm.config;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.text.SimpleDateFormat;

/**
 * @author ：xiexing
 * @description：返回时间格式化
 * @date ：2020/7/18 22:28
 */
@Configuration
public class ObjectMapperConf {

    @Bean
    public ObjectMapper getObjectMapper() {
        return new ObjectMapper().setDateFormat(new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"));
    }
}
